# \#FakeNews Buster
To protect against certain aspects of the ever evolving malicious media machinery,
I am starting a new open source browser extension with the aim of (on demand or automatically), archiving and timestamping content from the current webpage.

* Recording screenshot and archive current page with archiving services such as archive.fo and others
* Determine the current page's main body of text and generate a hash and save it locally
* Record the hash on the blockchain
* On re-visit of URL, compare against previous hash and alert if it has changed.

* Score the pages based on a heuristic, score is derived from such features as:
  - check for date and time
  - check for author
  - check for external links (citations)
  - check for ability to make comments on the page
  - Alexa and other page ratings services (privacy risk, can be disabled in Options)
  
Long term:
* Server(s) to proxy requests if needed, but preferably fully distributed
* Sharing of hashes and archives on DHT or other distributed networks
* Archiving and hashing of images
* Web of trust?


---
### Current status:
Pre-alpha:
Currently only archive.org saving is implemented.


---

I need your help! Please fork and contribute.


### Note: This page is oriented for developers only at this time.

## Installation

### Dependencies
	$ npm install

### Install extension to browser

Run `$ gulp --watch`

### for Chrome
  load the `dist`-directory into chrome.
### for Firefox
  go to `about:debugging` and find the `dist`-directory, load the `manifest.json` file.
  
## Entryfiles (bundles)

There are two kinds of entryfiles that create bundles.

1. All js-files in the root of the `./app/scripts` directory
2. All css-,scss- and less-files in the root of the `./app/styles` directory

## Tasks

### Build

    $ gulp


| Option         | Description                                                                                                                                           |
|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--watch`      | Starts a livereload server and watches all assets. <br>To reload the extension on change include `livereload.js` in your bundle.                      |
| `--production` | Minifies all assets                                                                                                                                   |
| `--verbose`    | Log additional data to the console.                                                                                                                   |
| `--vendor`     | Compile the extension for different vendors (chrome, firefox, opera)  Default: chrome                                                                 |
| `--sourcemaps` | Force the creation of sourcemaps. Default: !production                                                                                                |


### pack

Zips your `dist` directory and saves it in the `packages` directory.

    $ gulp pack --vendor=firefox

### Version

Increments version number of `manifest.json` and `package.json`,
commits the change to git and adds a git tag.


    $ gulp patch      // => 0.0.X

or

    $ gulp feature    // => 0.X.0

or

    $ gulp release    // => X.0.0


## Globals

The build tool also defines a variable named `ENV` in your scripts. It will be set to `development` unless you use the `--production` option.


**Example:** `./app/background.js`

	if(ENV === 'development'){
		console.log('We are in development mode!');
	}







